<?php 
/**
 * Parses for example 1024KB to 1MB and so on.
 * 
 * $params array can have these arguments<br>
 * size - item size<br>
 * from - default is B. In what units size is. (B,KB,MB,GB)<br>
 * to - default is NULL. This means whatever fits best.<br>
 * 
 * @param Array $params
 * @param Smarty $smarty
 * @return String
 */
function smarty_function_safeXml($params, &$smarty) {

	$var = array_pop($params);
	$var = str_replace('&','&amp;',$var);
	return $var;
}


?>